﻿using System;
using System.Collections.Generic;
using Assist;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YArchitech.HYSpace.SpaceManager
{
	public static class SpaceUtils
	{
		public static void HigtLightElement(UIApplication m_uiApp, ElementId eid)
		{
			if (m_uiApp == null || eid == null)
			{
				return;
			}
			UIDocument activeUIDocument = m_uiApp.ActiveUIDocument;
			if (activeUIDocument != null)
			{
				Element element = activeUIDocument.Document.GetElement(eid);
				if (element == null)
				{
					return;
				}
				List<Element> list = new List<Element>();
				list.Add(element);
				RevitVersionFuncs.SetSelection(activeUIDocument.Selection, list);
				activeUIDocument.ShowElements(eid);
			}
		}
	}
}
